<style lang="scss" scoped>
@import '~@/styles/fullschedule.scss';
.slot-col{
  border-right: 1px solid #EBEEF5;
}
.appListBox{
  padding: 3px 10px;
}
.appo-itembox{
  margin-top: 6px;
  margin-bottom: 6px;
}
</style>
<template>
  <div class="fsc-main flex">
    <div
      class="slot-col flex-1"
      v-for="(appo, scheduleIndex) in scheduledata"
      :key="scheduleIndex"
    >
      <div class="appListBox">
        <div
          class=""
          v-for="(sItem, appoIndex) in appo"
          :key="appoIndex"
        >
          <div class="appo-itembox">
            <fsItem
              :s-item="sItem"
              :status-template="statusTemplate"
            />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// import fscsidebar from './fscsidebar'
import fsItem from './fsItem'
import bus from '@/api/bus'
export default {
  // inject: ['sidebardataArr'],
  components: {
    // fscsidebar,
    fsItem
  },
  props: {
    sidebardata: {
      type: Array,
      default() {
        return []
      }
    },
    allCkb: {
      type: Boolean,
      default: false
    },
    rowHeight: {
      type: Number,
      default: 64
    },
    // 是否可编辑
    isEdit: {
      type: Boolean,
      default: false
    },
    // 是否可添加
    isAdd: {
      type: Boolean,
      default: true
    },
    // 模板排列，定位、日按顺序排
    appoRepair: {
      type: Boolean,
      default: false
    },
    // 判断需要显示的数据
    statusFilter: {
      type: String,
      default: ''
    },
    statusTemplate: {
      type: String,
      default: 'schedule'
    },
    // 快速排班的号源条件模板数据
    quickTempObj: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      scheduledata: [],
      isTimeTitle: false, // 是否显示时段名称
      isTimeSlot: true, // 是否显示时段
      // rowHeight: 64 // 主体格子的高度设置
      appoAddStyleObj: {
        height: '100%',
        top: 0
      },
      checkedObj: null,
      hoverObjAppo: {},
      actionCheckIds: []
    }
  },
  created() {
    // console.log('######################打印当前状态过滤条件statusFilter###################', this.statusFilter)
    bus.$on('getAppoClassify', (data) => {
      this.scheduledata = data
      console.log('getAppoClassify=>this.scheduledata', this.scheduledata)
    })
  },
  mounted() {
    console.log('sidebardata', this.sidebardata)
    // console.log('mounted_appoRepair', this.appoRepair)
    // console.log('mounted_scheduledata_in_fscmain.vue', this.scheduledata)
  },
  beforeDestroy() {
    bus.$off('getAppoClassify')
  },
  methods: {

  }
}
</script>
